<template>
	<div>
		<el-select-tree style="width: 100%;"
			:data="treeData"
			:props="props"
			:multiple="multiple"
			:clearable=true
			:check-strictly="checkStrictly"
			v-model="value"
		></el-select-tree>
	</div>
</template>

<script>
import ElSelectTree from 'el-select-tree';
//
export default {
  components: {
    ElSelectTree
  },
	props: {
		treeData: Array,
		treeProps: Object,
		multiple: {
			type: Boolean,
			default: true
		},
		checkStrictly: {
			type: Boolean,
			default: true
		}
	},
  data() {
    return {
			props: this.treeProps || { value: 'id', label: 'name', children: 'childrenList' },
			value: this.multiple ? [] : null
    };
  }
};
</script>
